<template>
  <div class="boxCity">
    <van-nav-bar
      title="我的地址"
      right-text="新建地址"
      left-arrow
      @click-left="$router.go(-1)"
      @click-right="$router.push('/newsite')"
    />
    <citySelect :item="obj"></citySelect>
  </div>
</template>

<script setup>
import { city } from "@/api";
import { ref } from "vue";
import citySelect from "../site/citySelect.vue";
let token = localStorage.getItem("token");
let obj = ref([]);
city(token).then((res) => {
  obj.value = res;
  console.log(res);
});
components: {
  citySelect;
}
</script>

<style lang="scss" scoped>
.boxCity{
  height: 100%;
  width: 100%;
  background-color: #fff;
}
::v-deep .van-nav-bar__text {
  // 必须加上空格
  color: #000;
}
::v-deep .van-badge__wrapper {
  color: #000;
}
</style>
